package com.ccn.crm.service.impl;

import com.ccn.crm.mapper.AfterSalesMapper;
import com.ccn.crm.model.AfterSales;
import com.ccn.crm.service.IAfterSales;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
@Service
public class AfterSalesServiceImpl implements IAfterSales {
    @Autowired
    private AfterSalesMapper  afterSalesMapper;
    @Override
    public int deleteByPrimaryKey(Integer id) {
        return afterSalesMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(AfterSales record) {
        return afterSalesMapper.insert(record);
    }

    @Override
    public AfterSales selectByPrimaryKey(Integer id) {
        return afterSalesMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<AfterSales> selectAll() {
        return afterSalesMapper.selectAll();
    }

    @Override
    public int updateByPrimaryKey(AfterSales record) {
        return afterSalesMapper.updateByPrimaryKey(record);
    }

    @Override
    public AfterSales selectSalesByWorkOrder(String workOrder) {
        return afterSalesMapper.selectSalesByWorkOrder(workOrder);
    }

    @Override
    public AfterSales selectSalesByTimeId(String timeId) {
        return afterSalesMapper.selectSalesByTimeId(timeId);
    }

    @Override
    public AfterSales selectConsumedByName(String timebelongs) {
        return afterSalesMapper.selectConsumedByName(timebelongs);
    }

    @Override
    public AfterSales selectLastWeekConsumedByName(String timebelongs) {
        return afterSalesMapper.selectLastWeekConsumedByName(timebelongs);
    }

    @Override
    public int updateDateByTimeId(String id , Date date) {
        return afterSalesMapper.updateDateByTimeId(id ,date);
    }
}
